export function createElement(vnode:any) {
  const { tag, props, children } = vnode
  const root = document.createElement(tag)

  children.forEach((child:any)=>{
    if(typeof child === 'string') {
      root.appendChild(document.createTextNode(child))
    } else {
      root.appendChild(createElement(child))
    }
  })

  return root
}